package second;

import java.util.Arrays;
import java.util.Scanner;

public class Main4 {
	public static void main(String[] args)
	{
		Scanner sc=new Scanner(System.in);
		while(true)
		{
		int n=sc.nextInt();
		String[][] strs =new String[n][];
		for (int i = 0; i < n; i++) {
			strs[i]=new String[i+1];
		}
			for (int p = 1; p <=n; p++) {
				for (int j = 1; j <= n; j++) {
					if(j>p)
						break;
					strs[p-1][j-1]=p+"*"+j+"="+p*j;
					if(p==j)
	                      System.out.printf("%d*%d=%d", p ,j,p*j);
	                 else
	                      System.out.printf("%d*%d=%-3d", p ,j,p*j);

				}
				System.out.printf("\n");
			}
		System.out.println(Arrays.deepToString(strs));
	    }
	}
}
